package cn.jinjimi.app.entity;

import java.util.List;

public class Article {

    /* 草稿 */
    public static final int STATUS_DRAFT = 1;
    /* 已发布 */
    public static final int STATUS_PUBLISH = 2;
    /* 审核中 */
    public static final int STATUS_STANDBY = 3;
    /* 已读 */
    public static final int STATUS_USER_HAS_READED = 4;

    /* 纯文字 */
    public static final int SHOWSTYLE_TITLE = 0;
    /* 文字图片 */
    public static final int SHOWSTYLE_TITLE_IMG = 1;
    /* 纯图片 */
    public static final int SHOWSTYLE_IMG = 2;

    /* 文章ID */
    private String id;

    /* 标题 */
    private String title;

    /* 作者 */
    private String author;

    /* 内容 */
    private String content;

    /* 文章摘要 */
    private String abstracts;

    /* 链接访问地址 */
    private String base_url;

    /* 作者ID */
    private int author_id;

    /* 阅读数 */
    private int readNum;

    /* 文章状态: 草稿/审核/发布 */
    private int status;

    private int readStatus = 0;

    /* 显示类型(纯标题/带图片/纯图片) */
    private int showStyle;

    /* 创建时间 */
    private long createdAt;

    /* 更新时间 */
    private long updatedAt;

    /* 发布时间 */
    private long publishAt;

    /* 原文链接 */
    private String link;

    /* 是否推荐文 默认0不是，1为推荐 */
    private int is_recommend;

    private ArticleCollect article_collect;
    private Category category;
    private List<Attachment> attachments;
    private List<ArticleTag> article_tag;
    private SharedRecord shared_record;

    //冗余字段,展显分析直接返回一个字符串的id
    private String sharedRecordId;

    public String getSharedRecordId() {
        return sharedRecordId;
    }

    public void setSharedRecordId(String sharedRecordId) {
        this.sharedRecordId = sharedRecordId;
    }

    public String getBase_url() {
        return base_url;
    }

    public void setBase_url(String base_url) {
        this.base_url = base_url;
    }

    public ArticleCollect getArticle_collect() {
        return article_collect;
    }

    public void setArticle_collect(ArticleCollect article_collect) {
        this.article_collect = article_collect;
    }

    public SharedRecord getShared_record() {
        return shared_record;
    }

    public void setShared_record(SharedRecord shared_record) {
        this.shared_record = shared_record;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getAuthor_id() {
        return author_id;
    }

    public void setAuthor_id(int author_id) {
        this.author_id = author_id;
    }

    public int getReadNum() {
        return readNum;
    }

    public void setReadNum(int readNum) {
        this.readNum = readNum;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public int getShowStyle() {
        return showStyle;
    }

    public void setShowStyle(int showStyle) {
        this.showStyle = showStyle;
    }

    public long getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(long createdAt) {
        this.createdAt = createdAt;
    }

    public long getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(long updatedAt) {
        this.updatedAt = updatedAt;
    }

    public long getPublishAt() {
        return publishAt;
    }

    public void setPublishAt(long publishAt) {
        this.publishAt = publishAt;
    }

    public Category getCategory() {
        return category;
    }

    public void setCategory(Category category) {
        this.category = category;
    }

    public List<Attachment> getAttachments() {
        return attachments;
    }

    public void setAttachments(List<Attachment> attachments) {
        this.attachments = attachments;
    }

    public int getReadStatus() {
        return readStatus;
    }

    public void setReadStatus(int readStatus) {
        this.readStatus = readStatus;
    }

    @Override
    public String toString() {
        return "Article{" +
                "id='" + id + '\'' +
                ", title='" + title + '\'' +
                ", author='" + author + '\'' +
                ", content='" + content + '\'' +
                ", base_url='" + base_url + '\'' +
                ", author_id=" + author_id +
                ", readNum=" + readNum +
                ", status=" + status +
                ", showStyle=" + showStyle +
                ", createdAt=" + createdAt +
                ", updatedAt=" + updatedAt +
                ", publishAt=" + publishAt +
                ", article_collect=" + article_collect +
                ", category=" + category +
                ", attachments=" + attachments +
                ", shared_record=" + shared_record +
                ", sharedRecordId='" + sharedRecordId + '\'' +
                '}';
    }

    public List<ArticleTag> getArticle_tag() {
        return article_tag;
    }

    public void setArticle_tag(List<ArticleTag> article_tag) {
        this.article_tag = article_tag;
    }

    public String getAbstracts() {
        return abstracts;
    }

    public void setAbstracts(String abstracts) {
        this.abstracts = abstracts;
    }

    public int getIs_recommend() {
        return is_recommend;
    }

    public void setIs_recommend(int is_recommend) {
        this.is_recommend = is_recommend;
    }

    public String getLink() {
        return link;
    }

    public void setLink(String link) {
        this.link = link;
    }
}